package org.stone.project.common.pojo.ro;

import lombok.Getter;
import lombok.Setter;
import org.stone.project.common.pojo.exception.ServiceException;
import org.stone.project.common.pojo.sysEnum.SystemCodeEnum;

/**
 * 分页参数
 */
@Getter
@Setter
public class
PageVo {
    /**
     * 页大小
     */
    private Integer pageSize = 10;

    /**
     * 当前页码
     */
    private Integer pageNum = 1;

    public void checkPageParam(){
        if (pageNum<= 0 || pageSize<=0){
            throw new ServiceException(SystemCodeEnum.CUS_ERROR,"分页参数错误");
        }
    }
}
